Skip to content

TYP: fix mypy errors in pandas/core/arraylike.py #39104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 15, 2021

Conversation

ivanovmg
Copy link
Member

@ivanovmg ivanovmg commented Jan 11, 2021

Handle ignored mypy errors in pandas/core/arraylike.py.

@@ -149,7 +149,7 @@ def __rpow__(self, other):
return self._arith_method(other, roperator.rpow)


def array_ufunc(self, ufunc: Callable, method: str, *inputs: Any, **kwargs: Any):
def array_ufunc(self, ufunc: np.ufunc, method: str, *inputs: Any, **kwargs: Any):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np.ufunc currently resolves to Any. I would mothball this PR till we have numpy types.

maybe you could just remove the annotation for now so that the ignores can be removed.

or test this with numpy 1.20.0rc2

@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label Jan 11, 2021
@simonjayhawkins simonjayhawkins added this to the 1.3 milestone Jan 11, 2021
@MarcoGorelli MarcoGorelli mentioned this pull request Jan 19, 2021
1 task
@github-actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Feb 11, 2021
@jreback
Copy link
Contributor

jreback commented Feb 11, 2021

@ivanovmg if you can merge master and update

@simonjayhawkins
Copy link
Member

Thanks @ivanovmg I think the idea is to remove the ignores as they can be seen as a sort of TODO. adding the comment imo does not move this forward.

I think if you revert 8b83486. we can then just merge as was. see #39257 (comment)

Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ivanovmg

@jbrockmendel
Copy link
Member

looks like @simonjayhawkins 's concerns have been addressed, so LGTM

@jreback jreback merged commit b176418 into pandas-dev:master Feb 15, 2021
@jreback
Copy link
Contributor

jreback commented Feb 15, 2021

thanks @ivanovmg

znicholls pushed a commit to znicholls/pandas that referenced this pull request Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants